package santeclair.referentiel.webservice.mock;

import java.util.Arrays;
import java.util.List;

import santeclair.referentiel.bean.Civilite;
import santeclair.referentiel.service.CiviliteService;

/**
 * Mock du service CiviliteService de referentiel-fwk.
 * Pour les tests unitaire sur les webservices du referentiel.
 * 
 * @author tsensebe
 * 
 */
public class CiviliteServiceMock implements CiviliteService {

    @Override
    public List<Civilite> findAll() {

        Civilite mr = new Civilite();
        mr.setAbreviation("M.");
        mr.setCode("MR");
        mr.setLibelle("Monsieur");

        Civilite mlle = new Civilite();
        mlle.setAbreviation("Mlle");
        mlle.setCode("MLLE");
        mlle.setLibelle("Mademoiselle");

        Civilite mme = new Civilite();
        mme.setAbreviation("Mme");
        mme.setCode("MME");
        mme.setLibelle("Madame");

        return Arrays.asList(mr, mlle, mme);
    }

    @Override
    public Civilite getByCode(String codeCivilite) {
        Civilite mr = new Civilite();
        mr.setAbreviation("M.");
        mr.setCode("MR");
        mr.setLibelle("Monsieur");

        return mr;
    }

}
